package nccloud.sso.util;

import java.net.URLEncoder;


/**
 * 测试生成oa待办的url
 * 
 * @author wzx
 *
 */

public class TestSSOBillDetailURL {
	public static void main(String[] args) {
		
		StringBuilder builder = new StringBuilder();
		builder.append("http://127.0.0.1:8888/nccloud/sso/visit.action?").append("apprparam=");

		String pk_message = "1001A11000000002I89D";
		String billno = "HR-LZ-2104210009";
		String pk_bill = "1001A11000000002I9SR";
		String appcode= "60092060";
		String pagecode= "60092060";
		String usercode = "009211";
		
//		String appcode= "20080PBM";
//		String pagecode= "20080PBM_CARD";
//		String billno = "D12021040900000264";
		
		// 参数列表
		StringBuilder desBuilder = new StringBuilder();
		desBuilder.append("&pk_message=").append(pk_message).append("&pk_bill=").append(pk_bill)
				.append("&c=").append(appcode).append("&p=").append(pagecode).append("&usercode=").append(usercode);
		
		String a = "http://127.0.0.1:8888/nccloud/sso/visit.action?tradetype=F3-Cxx-YKSPB&c=20080EBM405&p=20080EBM_CARD&usercode=yangxu&data=%7Btest%3A%22test%22%7D";

		try {
			builder.append(URLEncoder.encode(DesUtil.encrypt(a), "UTF-8"));
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		//生成的url在浏览器访问即可实现访问
		String pcUrl = builder.toString();
		System.out.println(pcUrl);
	}
}

